package logservice

import (
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
)

// 日志服务流程
// 1. 创建日志组
// 2. 创建日志流
// 3. 创建日志采集器
// 4. 配置日志索引

type CloudLogServiceInterface interface {
	LogCollectGetter
	LogGroupGreeter
	LogStreamGetter
}

type LogService struct {
	credentials *basic.Credentials
}

func NewLogService(credentials *basic.Credentials) CloudLogServiceInterface {
	return &LogService{
		credentials: credentials,
	}
}

func (l *LogService) LogCollect(region string) LogCollectInterface {
	return newCollect(l, region)
}

func (l *LogService) LogGroup(region string) LogGroupInterface {
	return newLogGroup(l, region)
}

func (l *LogService) LogStream(region string) LogStreamInterface {
	return newLogStream(l, region)
}
